import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () => import('@/views/test/test'),//这里指向的是views文件夹下test文件夹中的文件test
    //component: () => import('@/components/HelloWorld'),
    hidden: true
  },
  {
    path: "/register",
    component: () => import('@/views/test/register'),//这里指向的是views文件夹下test文件夹中的文件test
    //component: () => import('@/components/HelloWorld'),
    hidden: true
  },
  {
    path: "/sinfo",
    component: () => import('@/views/test/sinfo'),//这里指向的是views文件夹下test文件夹中的文件test
    //component: () => import('@/components/HelloWorld'),
    hidden: true,
    meta: {
      requireAuth: true
    }
  },
  {
    path: "/personal",
    component: () => import('@/views/test/personal'),//这里指向的是views文件夹下test文件夹中的文件test
    //component: () => import('@/components/HelloWorld'),
    children:[
      {
        path: "/upload/sinfo",
        component: () => import('@/views/test/sinfo'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
        
      },
      {
        path: "/upload/signup",
        component: () => import('@/views/test/signup'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
      },
      {
        path: "/upload/answer",
        component: () => import('@/views/test/answer'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
      },
      {
        path: "/upload/score",
        component: () => import('@/views/test/score'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
      },
      {
        path: "/upload/exams",
        component: () => import('@/views/test/exams'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
      },
      {
        path: "/upload/index",
        component: () => import('@/views/test/index'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true,
        meta: {
          requireAuth: true
        }
      },
    ]
  },
  {
    path: "/admin",
    component: () => import('@/views/test/admin'),//这里指向的是views文件夹下test文件夹中的文件test
    //component: () => import('@/components/HelloWorld'),
    children:[
      {
        path: "/upload/upload",
        component: () => import('@/views/test/upload'),//这里指向的是views文件夹下test文件夹中的文件test
        //component: () => import('@/components/HelloWorld'),
        hidden: true
      }
    ]
  },
];
const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});


export default router;
